<template>
  <div>
    <el-card class="box-card">
      <!-- 头部信息 -->
      <div slot="header" class="clearfix">
        <div class="header">最新纳税估值申报 <br /></div>
      </div>
      <div class="header1">基本信息</div>
      <el-form
        :model="ruleForm"
        :rules="rules"
        ref="ruleForm"
        label-width="140px"
        class="demo-ruleForm"
      >
        <div class="flexClass">
          <!-- 填报人 -->
          <el-form-item class="inputForm" label="填报人" prop="name">
            <el-input v-model="ruleForm.name"></el-input>
          </el-form-item>
          <!--申报单位  -->
          <el-form-item class="inputForm" label="申报单位" prop="region">
            <el-select v-model="ruleForm.region" placeholder="请选择活动区域">
              <el-option label="区域一" value="shanghai"></el-option>
              <el-option label="区域二" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </div>
        <!-- 上报说明 -->
        <el-form-item label="上报说明" prop="desc" class="shangbaoCalss">
          <el-input type="textarea" v-model="ruleForm.desc"></el-input>
        </el-form-item>
      </el-form>
    </el-card>
    <!-- 表格 -->
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>缴税详情</span>
        <div class="tabel_box">
          <el-table :data="tableData" border style="width: auto">
            <!-- 缴纳税种 -->
            <el-table-column label="缴纳税种" width="auto">
              <template slot-scope="scope">
                <span style="margin-left: 10px">{{ scope.row.title }}</span>
              </template>
            </el-table-column>

            <!--  预计估算(万元)-->
            <el-table-column label="预计估算(万元)" width="auto">
              <template slot-scope="scope">
                <el-input
                  v-model="form[`input${scope.row.$index}`]"
                  placeholder="请输入内容"
                >
                </el-input
              ></template>
            </el-table-column>
            <!--  清算估算(万元)-->
            <el-table-column label="清算估算(万元)" width="auto">
              <template slot-scope="scope"> {{ scope.row.nashui }}</template>
            </el-table-column>
            <!--  决策指标(万元)-->
            <el-table-column label="决策指标(万元)" width="auto">
              <template slot-scope="scope">{{ scope.row.nashui }} </template>
            </el-table-column>

            <!-- 状态 -->
            <el-table-column label="状态" width="auto">
              <template slot-scope="scope">
                <div
                  :class="{ zhuangtaiColorClass: scope.row.name }"
                  class="zhuangtaiClass"
                ></div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </div>
    </el-card>
    <!-- 底部 -->
    <div class="footer">
      <RelevantAttachments />
    </div>
  </div>
</template>
<script >
import RelevantAttachments from "./components/RelevantAttachments"; //底部import组件
export default {
  name: "TaxReckon",
  components: {
    RelevantAttachments,
  },
  data() {
    return {
      // 表格数据
      tableData: [
        {
          title: "税种",
          name: "万达集团",
          zhao: "--",
          zhibiao: "1700.12",
          nashui: 22,
        },
      ],
      //动态变量
      form: {},
      // 静态变量
      ruleForm: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
      // 验证
      rules: {
        name: [
          { required: true, message: "请输入活动名称", trigger: "blur" },
          { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
        ],
        region: [
          { required: true, message: "请选择活动区域", trigger: "change" },
        ],
        date1: [
          {
            type: "date",
            required: true,
            message: "请选择日期",
            trigger: "change",
          },
        ],
        date2: [
          {
            type: "date",
            required: true,
            message: "请选择时间",
            trigger: "change",
          },
        ],

        resource: [
          { required: true, message: "请选择活动资源", trigger: "change" },
        ],
        desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }],
      },
    };
  },
};
</script>

<style scoped lang='scss'>
// 基本信息 class
.flexClass {
  display: flex;
}
// 二级标题
.header1 {
  margin-bottom: 20px;
  margin-left: 50px;
}
// 一级标题颜色
.header {
  color: #498ab8;
  margin-bottom: 20px;
}
// 上报说明class
.shangbaoCalss {
  width: 50.8%;
}
// 表单input
.inputForm {
  margin-right: 10px;
}
// 表格状态
.zhuangtaiClass {
  width: 20px;
  height: 20px;
  border-radius: 50px;
  background-color: red;
}
// 表格状态颜色
.zhuangtaiColorClass {
  background-color: #6ccf60;
}
// 底部
.footer {
  margin-top: 20px;
}
.box-card {
  margin-top: 20px;
}
</style>